Skip to content

Conversation

@joshblack
Copy link
Member

Closes https://github.com/github/primer/issues/5725

Changelog

New

Changed

  • Update styled-react to change how we create a wrapper for styled components

Removed

  • Remove support for sx from Label

Rollout strategy

  • Major release; if selected, include a written rollout or migration plan

The sx prop for downstream components is being migrated to pull from @primer/styled-react

Copilot AI review requested due to automatic review settings August 20, 2025 18:59
@joshblack joshblack requested a review from a team as a code owner August 20, 2025 18:59
@joshblack joshblack requested a review from TylerJDev August 20, 2025 18:59
@changeset-bot
Copy link

changeset-bot bot commented Aug 20, 2025

🦋 Changeset detected

Latest commit: e517b18

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@primer/react Major
@primer/styled-react Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the sx prop from the Label component in the Primer React design system as part of a broader migration strategy. The change simplifies the Label component by removing styled-system support while providing a migration path through the @primer/styled-react package.

Key changes:

  • Remove sx prop support from the core Label component in @primer/react
  • Create a new styled Label wrapper in @primer/styled-react that preserves sx functionality
  • Update build configuration and dependencies to support the new implementation

Reviewed Changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/react/src/Label/Label.tsx Removes sx prop support and simplifies component implementation
packages/styled-react/src/index.tsx Creates new styled Label component with sx support using Box wrapper
packages/styled-react/src/polymorphic.ts Adds polymorphic component types for better TypeScript support
packages/styled-react/rollup.config.js Updates build config to handle JSX/TSX files
packages/styled-react/package.json Adds React preset for Babel compilation
.changeset/good-snakes-fix.md Documents breaking change for major version release

@github-actions github-actions bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Aug 20, 2025
@github-actions
Copy link
Contributor

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@github-actions github-actions bot temporarily deployed to storybook-preview-6631 August 20, 2025 19:10 Inactive
@joshblack joshblack changed the title feat: remove sx prop from Label @joshblack feat: remove sx prop from Label Aug 21, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 89.53 KB (+0.13% 🔺)
packages/react/dist/browser.umd.js 89.67 KB (+0.05% 🔺)

@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: failing Changes in this PR cause breaking changes in gh/gh labels Sep 16, 2025
@mperrotti mperrotti enabled auto-merge September 19, 2025 21:09
@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Sep 22, 2025
@github-actions
Copy link
Contributor

👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks!

@github-actions github-actions bot added integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Sep 24, 2025
@github-actions
Copy link
Contributor

👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks!

@github-actions github-actions bot temporarily deployed to storybook-preview-6631 September 24, 2025 01:31 Inactive
@github-actions github-actions bot removed the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Sep 24, 2025
@primer-integration
Copy link

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/3165

@primer-integration
Copy link

🟢 ci completed with status success.

@github-actions
Copy link
Contributor

👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks!

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Sep 29, 2025
@francinelucca francinelucca added this pull request to the merge queue Sep 29, 2025
Merged via the queue into main with commit 86b3e60 Sep 29, 2025
42 checks passed
@francinelucca francinelucca deleted the feat/remove-sx-from-label-2 branch September 29, 2025 21:18
@primer primer bot mentioned this pull request Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants